<div class="row">
    <div class="col-xs-12">
        <!-- PAGE CONTENT BEGINS -->
        <form class="form-horizontal" method="post" role="form">
            <!-- #section:elements.form -->
            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 角色名称: </label>

                <div class="col-sm-10">
                    <input name="vars[name]" class="col-xs-8 col-sm-4" type="text" value="{{$item['name']}}" required>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="form-input-readonly"> 角色描述: </label>

                <div class="col-sm-10">
                    <textarea class="col-sm-5" name="vars[desc]" required>{{$item['desc']}}</textarea>
                </div>
            </div>
            <!-- /section:elements.form -->
            <div class="space-4"></div>
       
            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="form-field-2">权限设置</label>
                <div class="col-sm-10">
                    <div class="col-xs-12 col-sm-8">
                        {{foreach from=$functions key=k item=func}}
                        <div class="widget-box">
                            <div class="widget-header">
                                <h4 class="widget-title">
                                    <!-- <input class="ace ace-checkbox-2 father" type="checkbox" name="vv" value="1" /> -->
                                    <span class="lbl">{{$func['name']}}</span>
                                </h4>

                                <div class="widget-toolbar">
                                    <a href="#" data-action="collapse">
                                        <i class="ace-icon fa fa-chevron-up"></i>
                                    </a>
                                </div>
                            </div>
                            <div class="widget-body">
                                <div class="widget-main">
                                    {{foreach  from=$func['sub'] key=sk item=subfunc}}
                                    <label class="inline" style="width:160px;">
                                        <input class="ace" type="checkbox" name="box[]" value="{{$subfunc['id']}}"
                                        {{if isset($item) && in_array($subfunc['id'],$item['list'])}}checked="checked"{{/if}}>
                                        <span class="lbl" role="checkbox" title="{{$subfunc['desc']}}">{{$subfunc['name']}}</span>
                                    </label>
                                    {{/foreach}}
                                     
                                </div>
                            </div>
                        </div>
                        {{/foreach}}
                    </div>
                </div>
            </div>

            <div class="space-4"></div>



            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <button class="btn btn-info" type="submit">
                        <i class="ace-icon fa fa-check bigger-110"></i>
                        Submit
                    </button>

                    &nbsp; &nbsp; &nbsp;
                    <button class="btn" type="reset">
                        <i class="ace-icon fa fa-undo bigger-110"></i>
                        Reset
                    </button>
                </div>
            </div>

        </form>
    </div><!-- /.col -->
</div>
<script>
    jQuery(function($) {

    })
</script>